import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//引入axios的封装
import http from './serve/axios.js'
// import Vant from 'vant';
// import 'vant/lib/index.css';
import BtmNavv from './components/btmNav.vue'
//懒加载
import { Lazyload } from 'vant';

Vue.use(Lazyload);

// 注册时可以配置额外的选项
Vue.use(Lazyload, {
  lazyComponent: true,
});

Vue.component('BtmNavv',BtmNavv)
//挂载bus到原型链上，中央走线
Vue.prototype.$bus = new Vue()
//挂载axios封装到原型链上
Vue.prototype.$http = http
//后台地址
Vue.prototype.$url = 'http://162.14.114.89:9999'
// Vue.use(Vant);
Vue.config.productionTip = false
//跳转页面和回到顶部
router.afterEach((to,from,next) => {
      window.scrollTo(0,0);
 })
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
